package com.bqtt.tumor.demo.entity;

import java.util.HashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.bqtt.tumor.demo.common.utility.InlineTools;

@Entity
@Table(name="body_part_def") 
public class BodyPart implements IDBEntity{

	@Id 
    @Column(name="body_part_id")    
    @GeneratedValue(strategy=GenerationType.IDENTITY) 
	private Integer body_part_id;
	
	@Column(name="body_part_name",length=100)   
	private String body_part_name;

	
	
	@Transient
	private String displayName;
	
	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	
	
	@Override
	public Map<String, Object> getSQLValidAttributes() {
		// TODO Auto-generated method stub
		Map<String,Object> result = new HashMap<String,Object>();
		
		if(!InlineTools.isEmpty(body_part_name))
		{
			result.put("body_part_name", body_part_name);
		}
		return result;
	}

	@Override
	public void fillStringField() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void fillDBfields() {
		// TODO Auto-generated method stub
		
	}

	public BodyPart() {
		super();
		displayName="none";
		// TODO Auto-generated constructor stub
	}

	public Integer getBody_part_id() {
		return body_part_id;
	}

	public void setBody_part_id(Integer body_part_id) {
		this.body_part_id = body_part_id;
	}

	public String getBody_part_name() {
		return body_part_name;
	}

	public void setBody_part_name(String body_part_name) {
		this.body_part_name = body_part_name;
	}
	

}
